const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {

  app.use('/mock', createProxyMiddleware({// /api2/home
    target: 'http://localhost:3333', // http://localhost:3333/mock/xxx
    changeOrigin: true,
    pathRewrite: { //路径替换
      // '^/api3': '/mock',
    }
  }));

};